<template>
  <div>
    <p>
      <el-button size="small" type="text" icon="el-icon-refresh" @click="listLoadedClasses"/>
      当前类加载器: {{classloaderName}}
    </p>

    <el-table
      :data="loadedClasses"
      border
      stripe
      style="width: 100%"
      height="500"
      highlight-current-row
      size="mini"
    >
      <el-table-column type="index" width="55" />
      <el-table-column
        prop="className"
        :show-overflow-tooltip="true"
        label="类名"
        sortable
      />
      <el-table-column
        label="mc"
        width="60"
        prop="methods"
      />

      <el-table-column
        prop="fields"
        label="fc"
        width="60"
      />
      <el-table-column
      label="操作"
      width="200"
      fixed="right"
      >
       <template slot-scope="{row}">
         <el-button type="text" size="small" @click="deCompile(row)">反编译</el-button>
       </template>
      </el-table-column>
    </el-table>


  </div>
</template>

<script>
import core from '@/api/core'

import DeCompile from '@/views/core/classloader/DeCompile'

export default {
  name: 'loaderClasses',
  components: {DeCompile},
  props: {
    classloaderName: String
  },
  data(){
    return {
      loadedClasses: []
    }
  },
  methods:{
    listLoadedClasses(){
      core.listLoadedClasses(this.classloaderName).then(res => {
        this.loadedClasses = res.data
      })
    },
    deCompile(row){

    }
  }
}
</script>

<style scoped>

</style>
